package com.example.demo1;

import org.springframework.web.bind.annotation.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: hp
 * Date: 2025-01-06
 * Time: 21:39
 */
@RestController
@RequestMapping("/demo")
public class Demo1 {
    @RequestMapping("/print1")
    public String print1() {
        return "hello Sping first!";
    }

    @RequestMapping(value = "/print2",method = RequestMethod.GET)
    public String print2() {
        return "GET请求";
    }

    @GetMapping("/print3")
    public String print3() {
        return "GetMapping";
    }

    @PostMapping("/print4")
    public String print4() {
        return "PostMapping";
    }

}
